<?php
namespace Home\Model;
use Think\Model;
    class GoodsModel extends Model {
      public function getByFilter($filed,$where)
       {
         //获取地址栏上的参数，SQL转义
           $filter=array_map(array($this->db,'escapeString'),I('get.'));
           $cid=$where['cid'];
           $goodslist=$this->field($field)->where($where)->select();
           return $goodslist;
       }
    }

